﻿@model CS795.TravelAgency.Models.HotelViewModel

@using (Html.BeginCollectionItem("Hotels"))
{
    <tr>
        <td>@Model.RoomType.ToString()</td>
        <td>@Model.Vendor</td>
        <td>@Model.QuoteId</td>
        <td>@Model.CheckIn.ToString("d")</td>
        <td>@Model.CheckOut.ToString("d")</td>
        <td>@(Model.Smoking ? "Yes" : "No")</td>
        <td>@Model.PricePerNight.ToString("C")</td>
        <td>@Model.TotalPrice.ToString("C")</td>
        <td>@Model.Status</td>
        @if (Model.Status == "Quoted")
        {
            <td>@Html.ActionLink("Reserve", "ReserveHotel", "Trip", new { id = Model.Id }, null)</td>
        }
        else if (Model.Status == "Reserved")
        {
            <td>
                @Html.ActionLink("Cancel", "CancelHotel", "Trip", new { id = Model.Id }, null) |
                @Html.ActionLink("Confirm", "ConfirmHotel", "Trip", new { id = Model.Id }, null)
            </td>
        }
        else
        {
            <td></td>
        }
    </tr>
}
